package com.pojo;


import com.auto.annotation.AutoCode;
import com.auto.annotation.Column;
import com.auto.annotation.MyFunction;
import com.auto.annotation.Table;

import java.io.Serializable;

/**
 * 中间数据公式字典
 */
@Table(name = "PD_MIDDATAFORMULADIC")
@AutoCode(isOverride = false, showWay = "list")
@MyFunction(autoInitFromAccess=true,copyLastYearData=false,treeSort=false)
public class MidDataFormulaDic implements Serializable {

	private static final long serialVersionUID = -4586123660062447825L;
	@Column(flag = "primary",jsname = "单位编号",jswidth = 150)
	private String companyid;
	@Column(flag = "primary",treeId=true,autoGenneral=true,treecolumn=true,jsname="编号",jswidth=150,jsAllowBlank=false,jsValidator=true,keyWordFilte=true)
	private String id;//id
	@Column(type="int",jsname = "排序号",jswidth = 150)
	private int orderid;//排序号，从小到大进行计算并覆盖之前的结果。
	@Column(type="varchar(200)",jsname="名称",jsAllowBlank=false,jswidth=150,keyWordFilte=true)
	private String name;//名称
	@Column(type="varchar(2000)",jsname = "公式",jswidth = 150)
	private String formula;//公式
	@Column(jsname = "状态", render = "function(v){if(v=='0'){return '<span style=\"color:green\"><b>启用中</b></span>';}else {return '<span style=\"color:red\"><b>已停用</b></span>';}}",
			jsxtype = "radiogroup [items:[{"
					+ "inputValue: '0',"
					+ "boxLabel: '启用',"
					+ "anchor  : '30%',"
					+ "name  : 'isstop',"
					+ "checked: true"
					+ "}, {"
					+ "inputValue: '1',"
					+ "anchor  : '30%',"
					+ "name  : 'isstop',"
					+ "boxLabel: '停用'"
					+ "}]]")
	private int isstop;//0否 1是
	@Column(type="int",jsname="小数位",jsAllowBlank=false,jswidth=150)
	private int dec;//小数位
	@Column(type="int",jsname="计算标识",jsAllowBlank=false,jswidth=150,render = "function(v){if(v=='1'){return '<span style=\"color:green\"><b>计算完成</b></span>';}else if(v=='0'){return '<span style=\"color:black\">待计算</span>'}else {return '<span style=\"color:red\"><b>计算失败</b></span>';}}")
	private int caclfalg;//计算标识 ： 0未计算 1计算成功 2计算失败
	@Column(type="varchar(500)",jsname="失败原因",jswidth=150)
	private String failreason;//失败原因


	//======================GETTER && SETTER===========================//

	public String getCompanyid() {
		return companyid;
	}

	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public int getOrderid() {
		return orderid;
	}

	public void setOrderid(int orderid) {
		this.orderid = orderid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFormula() {
		return formula;
	}

	public void setFormula(String formula) {
		this.formula = formula;
	}

	public int getIsstop() {
		return isstop;
	}

	public void setIsstop(int isstop) {
		this.isstop = isstop;
	}

	public int getDec() {
		return dec;
	}

	public void setDec(int dec) {
		this.dec = dec;
	}

	public int getCaclfalg() {
		return caclfalg;
	}

	public void setCaclfalg(int caclfalg) {
		this.caclfalg = caclfalg;
	}
}
